#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("arena.in","r",stdin);
	freopen("arena.out","w",stdout);
	int x;
	for(int i = 1;i<=32;i++) cin>>x;
	cout<<"5\n19\n7\n1";
	fclose(stdin);
	fclose(stdout);
	return 0;
}
